<template>
    <div>
        <h2>滴滴滴</h2>
        <demo ref="demoRef"></demo>
        <button @click="btnFn">按钮</button>
    </div>
</template>

<script>
import demo from '@/components/damo.vue'
export default {
components:{
    demo
},
methods:{
    btnFn(){
        console.log(this.$refs.demoRef)
        this.$refs.demoRef.fn()
    }
}
}
</script>

<style>

</style>